package com.hyt.it.ogt.pj.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyt.it.ogt.pj.model.entity.SubjectScore;
import com.hyt.it.ogt.pj.model.vo.StudentMarkStatus;
import com.hyt.it.ogt.pj.model.vo.TaskVo;

/**
 * <p>
 * 总分表 Mapper 接口
 * </p>
 *
 * @author qiaozj
 * @since 2020-07-09
 */
public interface SubjectScoreMapper extends BaseMapper<SubjectScore> {

    SubjectScore getStudentSubjectScore(@Param("projectId") String projectId, @Param("subjectId") String subjectId, @Param("encodeId") String encodeId);

    List<SubjectScore> getStudentSubjectScores(@Param("projectId") String projectId, @Param("subjectId") String subjectId, @Param("encodeIds") List<String> encodeIds);

    Integer getMarkNum(@Param("projectId") String projectId, @Param("subjectId") String subjectId);

    StudentMarkStatus selectStudentMarkStatus(@Param("projectId")String projectId, @Param("admissionNum")String admissionNum);

    /**
     * 考生客观分表中删除对应需要撤销评卷的考生客观分
     * @param projectId 评卷项目id
     * @param admissionNums 准考证号
     * @return 是否成功
     */
    int removeSubjectScore(@Param("projectId") String projectId, List<String> admissionNums);

    /**
     * 根据task任务更新数据
     * @param pushTaskVoList
     * @return
     */
    int updateListByTask(@Param("pushTaskVoList") List<TaskVo> pushTaskVoList);
    
    
    /***
     * 根据准考证号查询考生客观题总成绩
     * @param projectId
     * @param admissionNums
     * @return
     */
    List<SubjectScore> getStudentSubjectiveScoreByAdmissionNum(@Param("projectId") String projectId, @Param("admissionNums") List<String> admissionNums);
}
